package com.repair.payment.pojo.convertor;

import com.repair.api.pay.response.vo.PaymentInfoVO;
import com.repair.payment.pojo.entity.PaymentRefund;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author chunyu
 * @since 2024/10/22,13:32
 */
@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface PaymentRefundConvertor {

    PaymentRefundConvertor INSTANCE = Mappers.getMapper(PaymentRefundConvertor.class);

    /**
     * List<PaymentRefund> 转换为 List<PaymentInfoVO>
     * @param records List<PaymentRefund>
     * @return List<PaymentInfoVO>
     */
    List<PaymentInfoVO> mapToVOList(List<PaymentRefund> records);

    /**
     * PaymentRefund 转换为 PaymentInfoVO
     * @param paymentRefund PaymentRefund
     * @return PaymentInfoVO
     */
    PaymentInfoVO mapToVO(PaymentRefund paymentRefund);
}
